<template>
  <div class="main-border">
    <div class="inner-box">
      <div class="left-box">
        <div class="title-fix">{{ development[0].developTitle }}</div>
        <div class="ellipsis1" v-if="development[0]">
          <div v-html="development[0].developContent" class="text"></div>
        </div>
        <div class="img-container">
          <h4>{{ picture }}</h4>
          <div class="block">
            <el-carousel trigger="click">
              <div class="swiper">
                <div class="image">
                  <el-carousel-item v-for="(item, index) in srcList" :key="item.id">
                    <img v-for="child in item" :src="child.developImageUrl" alt="" style="width: 49%;height: 48%">
                  </el-carousel-item>
                </div>
              </div>
            </el-carousel>
          </div>
        </div>
      </div>
      <div class="right-box" v-if="development[1]">
        <div style="height: 35%">
          <div class="title-fix">{{ development[1].developTitle }}</div>
          <div class="ellipsis2" >
            <div v-html="development[1].developContent" class="text"></div>
          </div>
        </div>
        <div style="height: 33%;margin-top: 11%">
          <div class="title-fix">{{ development[2].developTitle }}</div>
          <div class="ellipsis3">
            <div v-html="development[2].developContent" class="text"></div>
          </div>
        </div>
       <div style="height: 26%;">
         <div class="title-fix">{{ development[3].developTitle }}</div>
         <div class="ellipsis4"  >
           <div v-html="development[3].developContent" class="text"></div>
         </div>
       </div>
      </div>
    </div>
  </div>
</template>
<script>
import item from '@/layout/components/Sidebar/Item'

export default {
  props:{
    development:{
      type:Array
    },
    imageSrc:{
      type:Array
    }
  },
  data(){
    return{
      picture:'',
      developTitle: '',
      //走马灯次数数组
      imageNum:[],
      //图片IMG数组
      srcList:[]
    }
  },
 watch:{
   imageSrc:{
      handler(newVal){
        let a_len = newVal.length
        let len = 4
        for (let i = 0; i < a_len; i+=len) {
          this.srcList.push(newVal.slice(i,i+len))
        }
      }
    }
 },
  methods:{
    change(){
    }
  }
}
</script>
<style scoped lang="scss">
.main-border {
  width: 98%;
  height: 9.1rem;
  background: rgba(28, 28, 28, 0.9);
  border: 0.04rem solid #00CEA0;
  border-radius: 0.2rem;
  box-shadow: inset 0 0 0.15rem 0.03rem rgba(0, 206, 160, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.05rem;
  margin-left: 0.1rem;
  margin-right: 0.1rem;
  .inner-box {
    height: 95%;
    width: 95%;
    display: grid;
    grid-template-columns: 5fr 4fr;
    //overflow: hidden;
    .left-box,.right-box{
      width: 98%;
      display: flex;
      flex: 1;
      height: 8.7rem;
      flex-direction: column;

      .left-box{
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
      }

      .img-container{
        flex: 1;
        display: flex;
        flex-direction: column;
      }

      .ellipsis1::-webkit-scrollbar, .ellipsis2::-webkit-scrollbar,.ellipsis3::-webkit-scrollbar,.ellipsis4::-webkit-scrollbar {
        width: 6px;
        //display: none; /* Chrome Safari */
      }
      .ellipsis1::-webkit-scrollbar-thumb, .ellipsis2::-webkit-scrollbar-thumb,.ellipsis3::-webkit-scrollbar-thumb,.ellipsis4::-webkit-scrollbar-thumb{
        background: rgba(255,255,255,0.07);
      }
      .ellipsis1{
        height: 40%;
        line-height: 0.25rem;
        box-sizing: border-box;
        overflow: auto;
        display:-webkit-box;
        text-overflow: ellipsis;
        -webkit-box-orient:vertical;
        word-break: break-all;
        position: relative;
        margin-top: 10%;
      }
      .ellipsis2{
        height: 100%;
        box-sizing: border-box;
        line-height: 0.25rem;
        overflow: auto;
        display:-webkit-box;
        text-overflow: ellipsis;
        -webkit-box-orient:vertical;
        word-break: break-all;
        position: relative;
        margin-top: 12%;
      }
      .ellipsis3{
        height: 80%;
        line-height: 0.25rem;
        box-sizing: border-box;
        overflow: auto;
        display:-webkit-box;
        text-overflow: ellipsis;
        -webkit-box-orient:vertical;
        //-webkit-line-clamp:10;
        word-break: break-all;
        position: relative;
        margin-top: 13%;
      }
      .ellipsis4{
        height: 77%;
        line-height: 0.25rem;
        box-sizing: border-box;
        overflow: auto;
        display:-webkit-box;
        text-overflow: ellipsis;
        -webkit-box-orient:vertical;
        //-webkit-line-clamp:7;
        word-break: break-all;
        position: relative;
        margin-top: 13%;
      }
      .element::-webkit-scrollbar { width: 0 !important }
    }
  }
}
.text{
  font-size: 0.16rem;
  margin-top: -0.1rem;
}

.swiper{
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  padding-right: 0.13rem;
}

.image{
  width: 50%;
  padding: 0.1rem;
}
.title-fix{
  position: absolute;
  font-size: 0.23rem;
  margin-top: 0.07rem;
  color: #00CEA0;
  font-weight: 550;
}

</style>
